package com.guandi.geekbrowser.primary.service.impl;

import com.guandi.geekbrowser.primary.entity.Role;
import com.guandi.geekbrowser.primary.repository.RoleRepository;
import com.guandi.geekbrowser.primary.service.RoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class RoleImpl implements RoleService {

    @Autowired
    private RoleRepository roleRepository;

    @Override
    public void save(Role role) {
        roleRepository.save(role);
    }

    @Override
    public Role findByUserId(String userId) {
        return roleRepository.findByUserId(userId);
    }
}
